In transistors, it is important to reduce the on-resistance and to increase the breakdown voltage. In a transistor based on compound semiconductor, the device is miniaturized to reduce the on-resistance. On the other hand, device miniaturization is likely to incur the decrease of breakdown voltage. To ensure the breakdown voltage, the impurity concentration in the pn junction portion is adjusted. However, impurity implantation for the adjustment may decrease the channel mobility. This incurs characteristics degradation such as the decrease of switching speed. In transistors, improvement and stabilization of the characteristics are desired.